合并Dev,添加保存异常堆栈功能(基于coredumpy)支持HTTP的access_token与HTTP POST的签名密钥验证 新增一些功能 优化部分日志和代码样式 修复一些bug#65
Merged
xiaosuyyds merged 20 commits intomasterfrom Mar 26, 2025
Merged
合并Dev,添加保存异常堆栈功能(基于coredumpy)支持HTTP的access_token与HTTP POST的签名密钥验证 新增一些功能 优化部分日志和代码样式 修复一些bug#65xiaosuyyds merged 20 commits intomasterfrom
xiaosuyyds merged 20 commits intomasterfrom
Conversation
在 CommandRule 中添加了 no_args 参数,用于指定是否需要严格匹配命令参数。当 no_args 为 True 时,消息必须完全匹配预设的命令前缀和别名,不能包含其他内容。
将 finalize_and_cleanup 函数从 main.py 移动到 common.py 中,以提高代码的模块化和可维护性。同时,更新 main.py 中的 atexit 注册,使用新的 common.finalize_and_cleanup 函数。
- 在发生异常时,可以选择性地保存堆栈信息到文件 - 在 config.yml 中添加 debug.save_dump 配置项 - 修改了多个文件以支持异常堆栈保存功能
- 将异常信息存储路径(DUMPS_PATH)从 data 目录移至项目根目录 - 在 constants.py 中添加新路径并确保其存在
- 将获取群成员昵称的方式从 get_group_member_info 改为 get_user_info
- 在 README.md 中添加了关于提交问题时可附加 debug dump 文件的说明- 补充了 MRB2 版本号命名规则的解释
- AnyRule: 输入多个规则,若匹配其中任意一个则返回 True - AllRule: 输入多个规则,若全部匹配则返回 True - 这两个类扩展了规则匹配的功能,支持更复杂的匹配逻辑
- 增加对全体成员at渲染的支持,当 qq 为 "all" 或 "0" 时返回 "@全体成员" - 优化 render 函数中的循环结构,提高代码可读性 - 修复 some 中文注释,保持代码一致性
- 修改 config.yml 和 ConfigManager.py 中关于 save_dump 的注释说明 - 更新 requirements.txt,移除 waitress 依赖,添加 coredumpy 依赖
- 在 Plugin 类中添加 extra 字段,可以是一个字典或 None - 用于存储任意信息,其他插件可以通过约定 extra 字典的键名来收集某些特殊信息 - 在 __post_init__ 方法中初始化 extra 字典,如果为 None 则设置为空字典
- 新增 bytes_io_to_file 函数,用于将 BytesIO 对象保存为文件 - 函数参数包括 BytesIO 对象、文件名、文件类型和保存目录 - 优化了类型注解和异常处理
- 在验证请求签名时添加异常处理,防止缺少签名的请求导致程序崩溃 - 增加日志记录,对缺少签名的请求进行警告 - 返回 401 状态码,拒绝非法请求
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
没活了(